var divObj;
//文档加载完毕后触发
window.onload = function () {
    divObj = document.getElementById("disDiv")
    var  allImg=divObj.getElementsByTagName("img");
    for (var i = 0; i < allImg.length; i++) {
        allImg[i].onclick=function (){
            changeImg(this);
        }
    }
}

function displayDiv() {
    if (divObj.style.display == "block") {
        divObj.style.display = "none";
    } else {
        divObj.style.display = "block"
    }
}

function changeImg(imgSrc, divID) {
    var imgObj = document.getElementById("look");
    imgObj.src = imgSrc.src;
    displayDiv();
}